<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="${pageContext.request.contextPath }/layui/layui_2/layui/css/layui.css" media="all"/>
<style type="text/css">
	body {
	    background-image: url(images/login6.png);      
        background-size:cover;
	}
</style>
</head>
<body>
	<div style="width:100%; height:100%; position:absolute; left:0; top:0; z-index:90; background-color:rgba(0,0,0,0.5);"></div>
	<div style="height:260px;width:260px;padding: 20px;background-color:rgba(0,0,0,0.5);border-radius: 4px;position:absolute;left: 50%;top: 50%; margin:-150px 0 0 -150px;z-index:99;">
	  	<div style="text-align: center;font-size: 25px;color:graytext; padding-bottom: 15px"><img alt="" src="images/log1.jpg" style="width: 30px;height: 30px">宁南化工管理</div>
	  	<form class="layui-form" action="${pageContext.request.contextPath}/userAction_login" id="loginForm" method="post" lay-filter="add_emp_form">
	  		<div class="layui-form-item">
			    <div class="layui-input-inline">
			      <input type="text" name="e_loginname" value="" lay-verify="required" placeholder="账号" autocomplete="off" class="layui-input" style="width: 260px">
			    </div>
			</div>
			<div class="layui-form-item">
			    <div class="layui-input-inline">
			      <input type="password" name="e_psw" value="" lay-verify="required" placeholder="密码" autocomplete="off" class="layui-input" style="width: 260px">
			    </div>
			</div>
			<div class="layui-form-item form_code">
				<input class="layui-input" name="code" placeholder="验证码" lay-verify="required" type="text" autocomplete="off">
				<div style="position:absolute; right:20px; top:176px; cursor:pointer;"><img id="loginform:vCode" src="validatecode.jsp"
								onclick="javascript:document.getElementById('loginform:vCode').src='validatecode.jsp?'+Math.random();" style="height: 38px"/></div>
		    </div>
			<button class="layui-btn" lay-submit="" lay-filter="saveDept" style="width:100%;">登录</button>
			<center><s:actionerror style="color:red"/></center>
	  	</form>
	</div>
	<script src="${pageContext.request.contextPath }/layui/layui_2/layui/layui.js"></script>
	<script>
	    layui.use(['element', 'table', 'jquery', 'layer', 'form', 'upload'], function () {
	        var $ = layui.jquery,
	            layer = layui.layer,
	            form = layui.form,
	            upload = layui.upload;
	       
	        var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
	        //监听提交
	        form.on('submit(add_emp_form)', function (data) {
				//阻止表单跳转。如果需要表单跳转，去掉这段即可。
				$('#loginForm').subimt();
				return false;
	        });
	    });
	</script>
</body>
</html>